﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.views.world.machines {
    import flash.events.*;
    import flash.display.*;
    import net.wooga.pets.constants.*;
    import net.wooga.pets.utils.*;

    public class FountainMachineView extends AbstractMachineView {

        private var _ani:MovieClip;

        public function FountainMachineView(_arg1:String, _arg2:MovieClip){
            super(_arg1, _arg2);
        }
        public function setPatient(_arg1:String):void{
            _asset.animation.gotoAndStop((_arg1 + "Old"));
        }
        public function setAnimation(_arg1:String):void{
            Displays.removeChild(this._ani);
            this._ani = AssetsLibrary.getMovieClip((_arg1 + "Regeneration"));
            this._ani.x = 7;
            this._ani.y = 32;
            this._ani.addFrameScript((this._ani.totalFrames - 1), this.onRegenerationFinished);
            _asset.animation.addChildAt(this._ani, 1);
        }
        private function onRegenerationFinished():void{
            this._ani.stop();
            dispatchEvent(new Event(EventConstants.REGENERATION_FINISHED));
        }

    }
}//package net.wooga.pets.views.world.machines 
